-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌱 Remove context from capv customized controller context #2431
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2431 +/- ##
==========================================
+ Coverage 62.65% 62.69% +0.03%
==========================================
Files 122 122
Lines 8770 8763 -7
==========================================
- Hits 5495 5494 -1
+ Misses 2877 2872 -5
+ Partials 398 397 -1
☔ View full report in Codecov by Sentry. |
/test |
@killianmuldoon: The
The following commands are available to trigger optional jobs:
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/test pull-cluster-api-provider-vsphere-e2e-full-main
c74e86e
to
ebecfaf
Compare
ebecfaf
to
59fbb97
Compare
@chrischdi Thanks for your review, all comments are addressed, it's ready for a second look. |
59fbb97
to
85bf07e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some last nits, but that should be it 🎉
85bf07e
to
c1dac02
Compare
/retest |
/test pull-cluster-api-provider-vsphere-test-main |
1 similar comment
/test pull-cluster-api-provider-vsphere-test-main |
Seems like somethings broken. Failed 3 times in a row at the same test. |
The failure cannot be reproduced locally by |
c1dac02
to
219486a
Compare
/lgtm |
LGTM label has been added. Git tree hash: 106aacf81c92bda187fe7571e29641e35e5f5dee
|
hold for if @sbueringer or @killianmuldoon want to review. |
/retest |
dd9842e
to
b78d12d
Compare
b78d12d
to
c4c42b8
Compare
Remove context from capv customized controller context, also get rid of containedctx exceptions. Signed-off-by: Gong Zhang <[email protected]>
c4c42b8
to
fa689e1
Compare
@zhanggbj: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/test pull-cluster-api-provider-vsphere-test-main |
/lgtm |
LGTM label has been added. Git tree hash: f4bb6be1c019ffdef1a60d099e59d8262bb4f497
|
Thx! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrischdi, sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@chrischdi @zhanggbj Sorry I have a huge backlog right now. Can one of you audit for similar cases across the code base? Basically when we start goroutines in reconcilers that should continue independent of the current Reconcile we should not passthrough the context and stop the goroutine if that context is Done. A concrete bug we would get is that we wouldn't reconcile again (before the resyncPeriod) after a task is finished (if a goroutine is waiting for task finish) if that context gets canceled (e.g. by controller-runtime) But on the other side we of course have the risk of leaking goroutines if the task never finishes. This seems to be a consequence of the current design. Let's audit to not stop the goroutines based on passed through context's for now and let's create an issue to discuss if we want to maybe put a timeout on the contexts used in those goroutines to avoid leaking goroutines (or some alternative if we have other ideas) P.S. If I understand the previous code (e.g. release-1.8) correctly context.Done only happened if the ControllerManagerContext.context was canceled. But this context was just a context.Background(), so I guess it never got canceled. So we don't lose anything if we get rid of the ctx.Done()'s for now |
@sbueringer It makes sense to me, I just opened an issue based on your input to track it, we could discuss more there #2465 |
What this PR does / why we need it:
Remove context from capv customized controller context, also get rid of containedctx exceptions.
This is part of #2295.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Part of
#2295
#2384